package com.example.controller;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.apache.log4j.Logger;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by linving on 2017/1/9.
 */
@RestController
public class UserController {
    Logger logger = Logger.getLogger(this.getClass());

    @ApiOperation(value="测试接口", notes="根据url的name来测试接口")
    @ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "String" ,paramType = "query")
    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public String test(String name) {
        logger.info("user - provider" + name);
        return "你好.." + name;
    }

}
